Reads a file from within the package associated with this session and writes it to a stream.
Parent Type: StoredLearningSession
Namespace: Microsoft.LearningComponents.Storage
Assembly: Microsoft.LearningComponents.Storage.dll
| C# |
|
public override void Render ( ) |
context
The context within which to render the file.
| Exception type | Condition |
| ArgumentNullException | Thrown if context is not provided. |
| InvalidOperationException | Thrown if |
| FileNotFoundException | Thrown if the file referenced in |
| DirectoryNotFoundException | Thrown if the file refernced in |
At a minimum, the caller must set the following properties in the context:
RelativePathOutputStream or ResponseMimeTypeFormId, if a default was used.OutputStream or Response of context. This method will not read and write content that is not contained within the package. For instance, if the entry point for an activity is an absolute URL and the caller passes it as the context.RelativePath, this method will not succeed. It also will not render the package manifest.
In an Execute session, this method may only be called when AttemptStatus is AttemptStatus.Active.
This method may cause changes to the state of the session. After calling this method and prior to disposing the object, the application should call CommitChanges to ensure changes are persisted.